window.onload = function() {
    getMusic();
}

function getMusic(){
    $ajax({
        url:"http://cloud-music.pl-fe.cn/album/list?limit=30",
        method:'get',
        success:function(e){
            console.log(e);
            let data = e.products;
            let str = '';
            let plate = document.getElementById('plate');
            for(let i=0; i<data.length; i++) {
                str += `<li>
                <div class="plate-img-box">
                    <img src="${data[i].coverUrl}" alt="" class="xdpic">
                    <div class="img-back-z"></div>
                    <a href="#" class="plate-img-box-a1">${data[i].albumName}</a>
                    <a href="#" class="plate-img-box-a2">${data[i].artistName}</a>
                </div>
                <a href="#">
                    <div class="action"></div>
                </a>
            </li>`
            }
            plate.innerHTML = str;
        }
    });
}